home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / Projects / Tutorial Material / Basic Tutorial / mctest7 < prev    next >
Lisp/Scheme  |  1998-10-26  |  1KB  |  44 lines

  1. ; tutorial example 7 -  mctest7
  2.  
  3. (initdef)
  4. (defsym a '(b c a))
  5. (defsym b '(f e))
  6. (defsym c '(b a))
  7. (defsym d '(a g))
  8.  
  9. (def-symbol
  10.   test1 (gen-trans a 4)
  11.   test2 (gen-trans d 4)
  12.   test3 (gen-trans c 4)
  13.   test4 (gen-trans d 4)
  14.   test5 (symbol-mix 
  15.           (gen-notrans a 2) (gen-notrans b 2) 
  16.           (gen-notrans c 2) (gen-notrans d 2))
  17. )
  18.  
  19. (def-length
  20.   test1 '(1/16 1/16 1/8 1/16)
  21.   test2 '(-1/16 1/8. 1/16 1/4)
  22.   test3 '(1/4 1/8 -1/8 1/16 1/32 1/32 1/8)
  23.   test4 '(1/8 1/16 -1/16 1/4 1/8 1/16 1/16)
  24.   test5 '(1/2 1/16 1/8 1/16)
  25. )
  26.  
  27. (setq tonals (activate-tonality (whole-tone c 5) (chromatic c 6)))
  28. (setq tonals1 (activate-tonality (chromatic c 6) (whole-tone c 5)))
  29. (setq chords 
  30.   (activate-tonality (c aug 7 1 4) (f# aug 9 1 3) (e min maj7 1 3)))
  31.  
  32. (compile-song-p "ccl;output:" 1/8 "part7"
  33. ; BARS               |-------|-------|-------|-------|
  34. changes  tonals     "            .   .  .      .    ."
  35. changes2 tonals1    "    .   .    .   .  .  .     . ."
  36. changes3 chords     "     . . .    ..  .  .   .   .. "
  37. test1    changes    "--     ----- --- ---    ----- --"
  38. test2    changes2   "  ---  ---   -- - --- --- --- --"
  39. test3    changes2   "    ---- ---   - - --   --- -- -"           
  40. test4    changes    "      -----  - - - --  - - - - -" 
  41. test5    changes3   " - -------   ---  -- ---  ---- -"
  42. )
  43.  
  44.